package
{
	import com.societyGames.flashForms.DockContainer;
	import com.societyGames.flashForms.DockType;
	import com.societyGames.flashForms.DockUnitType;
	import com.societyGames.flashForms.ExpanderContainer;
	import com.societyGames.flashForms.ExpanderHeaderContainer;
	import com.societyGames.flashForms.ExpanderHeaderContainer;
	import com.societyGames.flashForms.HorizontalSplitContainer;
	import com.societyGames.flashForms.MouseCursor;
	import com.societyGames.flashForms.TextButton;
	import com.societyGames.flashForms.Window;
	import com.societyGames.flashForms.basicSkin.BasicControls;
	
	import flash.display.Sprite;
	import flash.events.Event;
	
	[SWF(width="600", height="600", frameRate="30", backgroundColor="#FFFFFF")]
	public class FlashForms extends Sprite
	{
		public function FlashForms()
		{
			MouseCursor.initialize(this.stage); //Allows mouse cursor to render on top of everything else.
			initializeInterface();	
		}
		
		private function helloClickHandler(event:Event):void
		{
			trace("Hello");
		}
		
		private function worldClickHandler(event:Event):void
		{
			trace("World");
		}
		
		private function otherClickHandler(event:Event):void
		{
			trace("Other");
		}
		
		private var _helloButton:TextButton;
		private var _worldButton:TextButton;
		private var _otherButton:TextButton;
		
		private function initializeInterface():void
		{
			/*this._helloButton = BasicControls.createTextButton(helloClickHandler);
			this._helloButton.text = "Hello";
			
			this._worldButton = BasicControls.createTextButton(worldClickHandler);
			this._worldButton.text = "World";
			
			this._otherButton = BasicControls.createTextButton(otherClickHandler);
			this._otherButton.text = "Other";
			
			var dockContainer:DockContainer = new DockContainer();
			dockContainer.addItem(this._helloButton, DockType.top, DockUnitType.percent, 0.5);
			dockContainer.addItem(this._otherButton, DockType.left, DockUnitType.percent, 0.5);
			dockContainer.addItem(this._worldButton, DockType.fill, DockUnitType.percent, 1.0);
			
			var sprite:Sprite = new Sprite();
			sprite.graphics.beginFill(0);
			sprite.graphics.drawCircle(15, 15, 15);
			
			var splitContainer:HorizontalSplitContainer = BasicControls.createHorizontalSplitContainer();
			splitContainer.leftItem = dockContainer;
			splitContainer.leftPercent = 0.75;
			splitContainer.rightItem = sprite;
			
			var window:Window = BasicControls.createWindow("Title");
			window.width = 600;
			window.height = 600;
			window.child = splitContainer;
			this.addChild(window);*/
						
			var sprite:Sprite = new Sprite();
			sprite.graphics.beginFill(0);
			sprite.graphics.drawCircle(15, 15, 15);
			
			var sprite2:Sprite = new Sprite();
			sprite2.graphics.beginFill(0xFF0000);
			sprite2.graphics.drawCircle(15, 15, 15);
			
			var expanderContainer:ExpanderContainer = BasicControls.createExpanderContainer();
			expanderContainer.headerChild = sprite2;
			expanderContainer.child = sprite;
			
			var window:Window = BasicControls.createWindow("Title");
			window.width = 600;
			window.height = 600;
			window.child = expanderContainer;
			this.addChild(window);
			
			/*var sprite:Sprite = new Sprite();
			sprite.graphics.beginFill(0);
			sprite.graphics.drawCircle(15, 15, 15);
			
			var expanderHeaderContainer:ExpanderHeaderContainer = BasicControls.createExpanderHeaderContainer();
			expanderHeaderContainer.child = sprite;
			
			var window:Window = BasicControls.createWindow("Title");
			window.width = 600;
			window.height = 600;
			window.child = expanderHeaderContainer;
			this.addChild(window);*/
			
		}
	}
}